package cn.wen233.srpc.core.spring.server;

import cn.wen233.srpc.core.service.SunglowServiceScan;
import cn.wen233.srpc.core.spring.server.autoconfigure.SunglowServerRegistrar;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * 启用服务端注解
 *
 * @author wenei
 * @date 2021-12-26 13:54
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import(SunglowServerRegistrar.class)
public @interface EnableSunglowServer {

    /**
     * @return 服务端启动端口
     */
    int port() default 18888;

    /**
     * @return 应用名
     */
    String appName();

    /**
     * @return 扫描路径数组
     */
    SunglowServiceScan[] scans() default {};
}
